package com.dongbing.support.context;

import com.dongbing.entity.support.BatchTaskPO;
import com.sun.istack.internal.NotNull;

public class BatchTaskContext {

    private static final ThreadLocal<BatchTaskPO> CONTEXT = new ThreadLocal<>();

    public static BatchTaskPO get() {
        return CONTEXT.get();
    }

    public static void set(@NotNull BatchTaskPO taskPO) {
        CONTEXT.set(taskPO);
    }

    public static void clear() {
        CONTEXT.remove();
    }

}
